package com.szrt.day20170523.ch03.employee.factory;

import com.szrt.day20170523.ch03.employee.dao.EmployeeDao;
import com.szrt.day20170523.ch03.employee.dao.impl.EmployeeDaoMysqlImpl;
import com.szrt.day20170523.ch03.employee.dao.impl.EmployeeDaoOracleImpl;

public class DaoFactory implements Factory {

	@Override
	public EmployeeDao getInstance(int type) {
		
		if(type==3306){
			return new EmployeeDaoMysqlImpl();
		}else if(type==1521){
			return new EmployeeDaoOracleImpl();
		}
		return null;
	}

}
